import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/club_detail_entity.dart';

ClubDetailEntity $ClubDetailEntityFromJson(Map<String, dynamic> json) {
  final ClubDetailEntity clubDetailEntity = ClubDetailEntity();
  final int? memberLevel = jsonConvert.convert<int>(json['memberLevel']);
  if (memberLevel != null) {
    clubDetailEntity.memberLevel = memberLevel;
  }
  final String? createNickName = jsonConvert.convert<String>(
      json['createNickName']);
  if (createNickName != null) {
    clubDetailEntity.createNickName = createNickName;
  }
  final double? balance = jsonConvert.convert<double>(json['balance']);
  if (balance != null) {
    clubDetailEntity.balance = balance;
  }
  final double? state = jsonConvert.convert<double>(json['state']);
  if (state != null) {
    clubDetailEntity.state = state;
  }
  final String? featureContent = jsonConvert.convert<String>(
      json['featureContent']);
  if (featureContent != null) {
    clubDetailEntity.featureContent = featureContent;
  }
  final double? applyTime = jsonConvert.convert<double>(json['applyTime']);
  if (applyTime != null) {
    clubDetailEntity.applyTime = applyTime;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    clubDetailEntity.name = name;
  }
  final String? auditReason = jsonConvert.convert<String>(json['auditReason']);
  if (auditReason != null) {
    clubDetailEntity.auditReason = auditReason;
  }
  final int? totalMember = jsonConvert.convert<int>(json['totalMember']);
  if (totalMember != null) {
    clubDetailEntity.totalMember = totalMember;
  }
  final String? contactUsTg = jsonConvert.convert<String>(json['contactUsTg']);
  if (contactUsTg != null) {
    clubDetailEntity.contactUsTg = contactUsTg;
  }
  final String? groupName = jsonConvert.convert<String>(json['groupName']);
  if (groupName != null) {
    clubDetailEntity.groupName = groupName;
  }
  final String? contactUs = jsonConvert.convert<String>(json['contactUs']);
  if (contactUs != null) {
    clubDetailEntity.contactUs = contactUs;
  }
  final int? groupType = jsonConvert.convert<int>(json['groupType']);
  if (groupType != null) {
    clubDetailEntity.groupType = groupType;
  }
  final String? groupAddress = jsonConvert.convert<String>(
      json['groupAddress']);
  if (groupAddress != null) {
    clubDetailEntity.groupAddress = groupAddress;
  }
  final int? groupAddressType = jsonConvert.convert<int>(
      json['groupAddressType']);
  if (groupAddressType != null) {
    clubDetailEntity.groupAddressType = groupAddressType;
  }
  final double? createdAt = jsonConvert.convert<double>(json['createdAt']);
  if (createdAt != null) {
    clubDetailEntity.createdAt = createdAt;
  }
  final String? introduce = jsonConvert.convert<String>(json['introduce']);
  if (introduce != null) {
    clubDetailEntity.introduce = introduce;
  }
  final double? maxMember = jsonConvert.convert<double>(json['maxMember']);
  if (maxMember != null) {
    clubDetailEntity.maxMember = maxMember;
  }
  final int? levelId = jsonConvert.convert<int>(json['levelId']);
  if (levelId != null) {
    clubDetailEntity.levelId = levelId;
  }
  final String? createUserId = jsonConvert.convert<String>(
      json['createUserId']);
  if (createUserId != null) {
    clubDetailEntity.createUserId = createUserId;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    clubDetailEntity.id = id;
  }
  final String? applyingReason = jsonConvert.convert<String>(
      json['applyingReason']);
  if (applyingReason != null) {
    clubDetailEntity.applyingReason = applyingReason;
  }
  final String? featureTitle = jsonConvert.convert<String>(
      json['featureTitle']);
  if (featureTitle != null) {
    clubDetailEntity.featureTitle = featureTitle;
  }
  final String? avatar = jsonConvert.convert<String>(json['avatar']);
  if (avatar != null) {
    clubDetailEntity.avatar = avatar;
  }
  final String? ownerId = jsonConvert.convert<String>(json['ownerId']);
  if (ownerId != null) {
    clubDetailEntity.ownerId = ownerId;
  }
  final String? benefit = jsonConvert.convert<String>(json['benefit']);
  if (benefit != null) {
    clubDetailEntity.benefit = benefit;
  }
  final double? auditTime = jsonConvert.convert<double>(json['auditTime']);
  if (auditTime != null) {
    clubDetailEntity.auditTime = auditTime;
  }
  final double? join = jsonConvert.convert<double>(json['join']);
  if (join != null) {
    clubDetailEntity.join = join;
  }
  return clubDetailEntity;
}

Map<String, dynamic> $ClubDetailEntityToJson(ClubDetailEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['memberLevel'] = entity.memberLevel;
  data['createNickName'] = entity.createNickName;
  data['balance'] = entity.balance;
  data['state'] = entity.state;
  data['featureContent'] = entity.featureContent;
  data['applyTime'] = entity.applyTime;
  data['name'] = entity.name;
  data['auditReason'] = entity.auditReason;
  data['totalMember'] = entity.totalMember;
  data['contactUsTg'] = entity.contactUsTg;
  data['groupName'] = entity.groupName;
  data['contactUs'] = entity.contactUs;
  data['groupType'] = entity.groupType;
  data['groupAddress'] = entity.groupAddress;
  data['groupAddressType'] = entity.groupAddressType;
  data['createdAt'] = entity.createdAt;
  data['introduce'] = entity.introduce;
  data['maxMember'] = entity.maxMember;
  data['levelId'] = entity.levelId;
  data['createUserId'] = entity.createUserId;
  data['id'] = entity.id;
  data['applyingReason'] = entity.applyingReason;
  data['featureTitle'] = entity.featureTitle;
  data['avatar'] = entity.avatar;
  data['ownerId'] = entity.ownerId;
  data['benefit'] = entity.benefit;
  data['auditTime'] = entity.auditTime;
  data['join'] = entity.join;
  return data;
}

extension ClubDetailEntityExt on ClubDetailEntity {
  ClubDetailEntity copyWith({
    int? memberLevel,
    String? createNickName,
    double? balance,
    double? state,
    String? featureContent,
    double? applyTime,
    String? name,
    String? auditReason,
    int? totalMember,
    String? contactUsTg,
    String? groupName,
    String? contactUs,
    int? groupType,
    String? groupAddress,
    int? groupAddressType,
    double? createdAt,
    String? introduce,
    double? maxMember,
    int? levelId,
    String? createUserId,
    String? id,
    String? applyingReason,
    String? featureTitle,
    String? avatar,
    String? ownerId,
    String? benefit,
    double? auditTime,
    double? join,
  }) {
    return ClubDetailEntity()
      ..memberLevel = memberLevel ?? this.memberLevel
      ..createNickName = createNickName ?? this.createNickName
      ..balance = balance ?? this.balance
      ..state = state ?? this.state
      ..featureContent = featureContent ?? this.featureContent
      ..applyTime = applyTime ?? this.applyTime
      ..name = name ?? this.name
      ..auditReason = auditReason ?? this.auditReason
      ..totalMember = totalMember ?? this.totalMember
      ..contactUsTg = contactUsTg ?? this.contactUsTg
      ..groupName = groupName ?? this.groupName
      ..contactUs = contactUs ?? this.contactUs
      ..groupType = groupType ?? this.groupType
      ..groupAddress = groupAddress ?? this.groupAddress
      ..groupAddressType = groupAddressType ?? this.groupAddressType
      ..createdAt = createdAt ?? this.createdAt
      ..introduce = introduce ?? this.introduce
      ..maxMember = maxMember ?? this.maxMember
      ..levelId = levelId ?? this.levelId
      ..createUserId = createUserId ?? this.createUserId
      ..id = id ?? this.id
      ..applyingReason = applyingReason ?? this.applyingReason
      ..featureTitle = featureTitle ?? this.featureTitle
      ..avatar = avatar ?? this.avatar
      ..ownerId = ownerId ?? this.ownerId
      ..benefit = benefit ?? this.benefit
      ..auditTime = auditTime ?? this.auditTime
      ..join = join ?? this.join;
  }
}